import { createStore } from 'vuex'

const MEMBER = "MEMBER"
export default createStore({
  state: {
    //如果有值就是缓存的值 没有值就是空对象
    member:window.SessionStorage.get(MEMBER)||{}},
  getters: {
  },
  mutations: {
    setmember(state,member){
      state.member =member
      //更新或者变动的时候 修改
      window.SessionStorage.set(MEMBER,member)
    }
  },
  actions: {
  },
  modules: {
  }
})
